package cn.broadsense.thrid.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;

/**
 * 基类
 *
 * @author pengxin
 * @date 2022-10-08 14:10
 */
public class BaseRepository {

    @Value("${dh.api.xc.url:}")
    protected String url;

    @Value("${dh.api.c.url:}")
    protected String cUrl;

    @Lazy
    @Autowired
    protected DaHuaTokenRepository daHuaTokenRepository;

    /**
     * 获取token
     *
     * @return
     */
    protected String getToken() {
        return daHuaTokenRepository.getDHToken();
    }

    /**
     * c 系列token
     *
     * @return
     */
    protected String getCToken() {
        return daHuaTokenRepository.getDhCToken();
    }

}
